using UnityEngine;

namespace KaoticSSB.Weapons
{
	public class MeleeWeapon : WeaponBase
	{
		public float Duration = 0.5f;
		public Vector2 AttackDirection
		{
			get;
			set;
		}

		public MeleeWeapon ()
		{
			mCurrentTimer = Duration;
			AttackDirection = new Vector2(0.0f, 0.0f);
		}

		/*
		 * \brief Update is called once per frame
		 */
		public override void Update () 
		{
			base.Update();

			mCurrentTimer -= Time.deltaTime;
			if(mCurrentTimer <= 0.0f)
			{
				Destroy (this.gameObject);
			}
		}

		public override void OnTriggerEnter2D(Collider2D collisionObject)
		{
		}

		private float mCurrentTimer;
	}
}

